﻿<Window x:Class="DBDocumenter.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:uc="clr-namespace:DBDocumenter.UserControls"
    xmlns:rc ="clr-namespace:DBDocumenter.Resources"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    Width="1000"
    Height="600"
    FontFamily="Segoe UI"
    WindowStartupLocation="CenterScreen"
    Loaded="Window_Loaded"
    Unloaded="Window_Unloaded"
    ResizeMode="CanMinimize" WindowStyle="None"
    Background="{DynamicResource DBDocumenter_Background}"
    Icon="/Resources/Images/Application.ico" Title="DBDocumenter"
        Closing="Window_Closing" StateChanged="Window_StateChanged"
        IsVisibleChanged="Window_IsVisibleChanged">
    <Window.Resources>
        <!--<Storyboard x:Key="ZoomOutStoryboard" Completed="ZoomOutStoryboard_Completed">
            <DoubleAnimation 
                    Storyboard.TargetName="grdContent"
                    Storyboard.TargetProperty="(Grid.Height)" 
                    From="350" To="0" Duration="0:0:2"  />
        </Storyboard>
        <Storyboard x:Key="ZoomInStoryboard">
            <DoubleAnimation 
                                Storyboard.TargetName="grdContent"
                                Storyboard.TargetProperty="(Grid.Height)" 
                                From="0" To="350" Duration="0:0:2"  />
        </Storyboard>-->
       
        <!--<Storyboard x:Key="ZoomOutStoryboard" Completed="ZoomOutStoryboard_Completed">
            <DoubleAnimation 
                    Storyboard.TargetName="grdContent"
                    Storyboard.TargetProperty="(Grid.Width)" 
                    From="600" To="0" Duration="0:0:2"  />
        </Storyboard>
        <Storyboard x:Key="ZoomInStoryboard">
            <DoubleAnimation 
                                Storyboard.TargetName="grdContent"
                                Storyboard.TargetProperty="(Grid.Width)" 
                                From="0" To="600" Duration="0:0:2"  />
        </Storyboard>-->

        <!-- Show Window Animation -->
        <Storyboard x:Key="showWindow">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="720"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>


        <!-- Close Window Animation -->
        <Storyboard x:Key="hideWindow" Completed="HideWindowStoryboard_Completed" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="dbInfo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="720"/>
                <SplineDoubleKeyFrame KeyTime="00:00:001" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
    </Window.Resources>
    <Grid>
        <!--<Rectangle HorizontalAlignment="Left" x:Name="background" VerticalAlignment="Top" Width="1000" Height="600" Fill="{DynamicResource DBDocumenter_Background}" Stroke="#FF000000" Margin="1,1,0,0"/>-->
        <Border BorderThickness="2" BorderBrush="{DynamicResource Border_Colour}" CornerRadius="10,10,10,10" Margin="20,20,20,20" >
            <DockPanel x:Name="dbMainPanel">
                <Grid VerticalAlignment="Top" DockPanel.Dock="Top" Background="{x:Null}" Height="30">
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="10" RadiusY="10" Opacity="0.08" Margin="-4,-4,-4,-4"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="8" RadiusY="8" Opacity="0.08" Margin="-2,-2,-2,-2"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Opacity="0.08" Margin="-1,-1,-1,-1"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource DBDocumenter_FooterBackground}" Stroke="{x:Null}" RadiusX="8" RadiusY="8"/>
                    <Rectangle HorizontalAlignment="Stretch" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Margin="1,1,1,1" IsHitTestVisible="False">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#2FFFFFFF" Offset="0.469"/>
                                <GradientStop Color="#00FFFFFF" Offset="0.498"/>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                </Grid>
                <DockPanel DockPanel.Dock="Top">
                    <Grid DockPanel.Dock="Left" Width="250" Height="450" Margin="10,10,10,10">
                        <uc:UCCaptionScreen x:Name="wzSteps"/>
                    </Grid>
                    <Grid DockPanel.Dock="Right" Width="650" Height="450" Margin="10,10,10,10">
                        <Border BorderThickness="2" BorderBrush="{DynamicResource Border_Colour}" CornerRadius="10,10,10,10" >
                            <DockPanel>
                                <Grid Name="grdContent" DockPanel.Dock="Top">
                                    <uc:UCDatabaseInformation x:Name="dbInfo" RenderTransformOrigin="0.5,0.5">
                                        <uc:UCDatabaseInformation.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                <RotateTransform Angle="0"/>
                                            </TransformGroup>
                                        </uc:UCDatabaseInformation.RenderTransform>
                                    </uc:UCDatabaseInformation>
                                </Grid>
                                <Grid DockPanel.Dock="Bottom" VerticalAlignment="Bottom" Width="479" Height="62" x:Name="LayoutRoot">
                                    <Grid HorizontalAlignment="Stretch" x:Name="SearchGrid" VerticalAlignment="Stretch">
                                        <Grid Margin="5,10,5,10" Background="{x:Null}">
                                            <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Opacity="0.08" Margin="-3,-3,-3,-3"/>
                                            <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="6" RadiusY="6" Opacity="0.08" Margin="-2,-2,-2,-2"/>
                                            <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="5" RadiusY="5" Opacity="0.08" Margin="-1,-1,-1,-1"/>
                                            <Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource WebSearch_SearchBoxBackground}" Stroke="{x:Null}" RadiusX="4" RadiusY="4"/>
                                        </Grid>

                                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Height="Auto">
                                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Stretch" Height="41" Orientation="Horizontal">
                                                <!--<Button HorizontalAlignment="Stretch" Click="btnPrevious_Click" x:Name="btnPrevious" Template="{DynamicResource CollectionItemGlassButton}" VerticalAlignment="Bottom" Width="100" Height="22" Content="Previous" BorderThickness="0,0,0,0"/>-->
                                                <!--<Button HorizontalAlignment="Stretch" Click="btnNext_Click" x:Name="btnNext" Style="{DynamicResource ButtonSearch}" VerticalAlignment="Bottom" Width="100" Height="22" Content="Next" BorderThickness="0,0,0,0"/>-->
                                                <Button Name="btnPrevious" Click="btnPrevious_Click" Height="35" Foreground="#FFFFFFFF" Template="{DynamicResource ButtonControlTemplate}" d:LayoutOverrides="Height" Margin="4,4,4,4">
                                                    <StackPanel Margin="0,0,0,0" Orientation="Horizontal" Opacity="0.895" >
                                                        <Image Margin="4,0,4,0" HorizontalAlignment="Left" Height="25" Width="25" Source="/Resources/Images/Previous.png"  />
                                                        <TextBlock Width="100" Text="{x:Static rc:PLResources.Previous}" Margin="4,0,4,0" VerticalAlignment="Center" HorizontalAlignment="Left" Style="{DynamicResource ButtonText_Style}" TextWrapping="WrapWithOverflow"/>
                                                    </StackPanel>
                                                </Button>
                                                <Button Name="btnNext" Click="btnNext_Click" Height="35" Foreground="#FFFFFFFF" Template="{DynamicResource ButtonControlTemplate}" d:LayoutOverrides="Height" Margin="4,4,4,4">
                                                        <StackPanel Margin="0,0,0,0" Orientation="Horizontal" Opacity="0.895" >
                                                            <TextBlock Margin="4,0,4,0" Width="100" Text="{x:Static rc:PLResources.Next}" VerticalAlignment="Center" TextAlignment="Right" HorizontalAlignment="Right" Style="{DynamicResource ButtonText_Style}" TextWrapping="WrapWithOverflow" />
                                                            <Image Margin="4,0,4,0" HorizontalAlignment="Left" Height="25" Width="25" Source="/Resources/Images/Next.png"  />
                                                        </StackPanel>  
                                                </Button>
                                                <Button Name="btnExit" Click="btnExit_Click" Height="35" Foreground="#FFFFFFFF" Template="{DynamicResource ButtonControlTemplate}" d:LayoutOverrides="Height" Margin="4,4,4,4">
                                                        <StackPanel Margin="0,0,0,0" Orientation="Horizontal" Opacity="0.895" >
                                                        <Image Margin="4,0,4,0" HorizontalAlignment="Left" Height="25" Width="25" Source="/Resources/Images/Exit.png"  />
                                                        <TextBlock Width="100" Text="{x:Static rc:PLResources.Exit}" Margin="4,0,4,0" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Stretch" Style="{DynamicResource ButtonText_Style}" TextWrapping="WrapWithOverflow" />
                                                        </StackPanel>
                                                </Button>
                                            </StackPanel>
                                        </StackPanel>

                                        <Grid Margin="5,10,5,13" Background="{x:Null}" IsHitTestVisible="False" >
                                            <Rectangle HorizontalAlignment="Stretch" Stroke="{x:Null}" RadiusX="3" RadiusY="3" Margin="1,1,1,1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                        <GradientStop Color="#37FFFFFF" Offset="0.478"/>
                                                        <GradientStop Color="#00FFFFFF" Offset="0.49"/>
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                        </Grid>
                                    </Grid>
                                </Grid>
                            </DockPanel>
                        </Border>
                    </Grid>
                </DockPanel>
                <Grid VerticalAlignment="Bottom" DockPanel.Dock="Bottom" Background="{x:Null}" Height="30">
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="10" RadiusY="10" Opacity="0.08" Margin="-4,-4,-4,-4"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="8" RadiusY="8" Opacity="0.08" Margin="-2,-2,-2,-2"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Opacity="0.08" Margin="-1,-1,-1,-1"/>
                    <Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource DBDocumenter_FooterBackground}" Stroke="{x:Null}" RadiusX="8" RadiusY="8"/>
                    <Rectangle HorizontalAlignment="Stretch" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Margin="1,1,1,1" IsHitTestVisible="False">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#2FFFFFFF" Offset="0.469"/>
                                <GradientStop Color="#00FFFFFF" Offset="0.498"/>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <StackPanel HorizontalAlignment="Left" Margin="8,2,0,2" Orientation="Horizontal">
                        <Button Style="{DynamicResource RedThemeButton}" Width="68" Height="25" Content="" x:Name="ThemeRed" Click="OnThemeChange" />
                        <Button Style="{DynamicResource GreenThemeButton}" Width="68" Height="25" Content="" Margin="2,0,0,0" x:Name="ThemeGreen" Click="OnThemeChange" />
                    </StackPanel>
                    <Button HorizontalAlignment="Right" Name="btnAbout" Click="btnAbout_Click" Height="30" Foreground="#FFFFFFFF" Template="{DynamicResource ButtonControlTemplate}" d:LayoutOverrides="Height">
                        <StackPanel Margin="0,0,0,0" Orientation="Horizontal" Opacity="0.895" >
                            <Image Margin="4,0,4,0" HorizontalAlignment="Left" Height="30" Width="30" Source="/Resources/Images/About.png"  />
                            <TextBlock Width="150" Text="{x:Static rc:PLResources.AboutDocumenter}" Margin="4,0,4,0" VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Stretch" Style="{DynamicResource ButtonText_Style}" TextWrapping="WrapWithOverflow" />
                        </StackPanel>
                    </Button>
                </Grid>
            </DockPanel>
        </Border>
        <uc:UCModalPopup x:Name="ucPopup" Visibility="Collapsed" />
    </Grid>
        
</Window>
